<h1>Listar Participantes</h1>

<table>
  <tr>
  </tr>
<% @participants.each do |participant| %>

  <tr>
  	<td>
	<% if(participant.photo_file_name.blank?)&(participant.image.blank?) %>
		<%= image_tag("/images/default.jpg",  :size => "150x100" ) %>
		<% else %>
			<% if(participant.photo_file_name.blank?)%>
				<%= image_tag participant.image,  :size => "150x100" %>
				<% else %>
					<% if(participant.image.blank?)%>
						<%= image_tag participant.photo.url,  :size => "150x100" %>
						<% else %>
							<%= image_tag participant.photo.url,  :size => "150x100" %>
					<% end %>
			<% end %>
	<% end %>
	
	
	
	
	
		
	</td>
	<td>
		<h1><%= participant.name %></h1>
	</td>
    <td><%= link_to 'Mostrar', participant %></td>
    <td><%= link_to 'Modificar', edit_participant_path(participant) %></td>
    <td><%= link_to 'Eliminar', participant, :confirm => 'Esta seguro?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'Nuevo Participante', new_participant_path %>